package eatpoopyoucat;

import com.google.appengine.api.datastore.Key;
import com.google.appengine.api.users.User;

import java.util.Date;
import java.util.List;
import javax.jdo.annotations.IdGeneratorStrategy;
import javax.jdo.annotations.IdentityType;
import javax.jdo.annotations.PersistenceCapable;
import javax.jdo.annotations.Persistent;
import javax.jdo.annotations.PrimaryKey;

@PersistenceCapable(identityType = IdentityType.APPLICATION)
public class EpycGame {
    @PrimaryKey
    @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
    private Key key;
        
    @Persistent
    private List<User> userList;
    
    @Persistent
    private User currentUser;
    
    @Persistent
    private EnumState currentState;
    
    @Persistent
    private Date startDate;
    
    @Persistent
    private Key lastContentID;
    
    public EpycGame(List<User> userList, Date startDate, Key lastContentID) {
    	this.setUserList(userList);
    	this.setCurrentState(EnumState.TEXT);
    	this.setCurrentUser(userList.get(1));
    	this.setStartDate(startDate);
    	this.setLastContentID(lastContentID);
    }

    public Key getKey() {
        return key;
    }

	public List<User> getUserList() {
		return userList;
	}

	public void setUserList(List<User> userList) {
		this.userList = userList;
	}

	public User getCurrentUser() {
		return currentUser;
	}

	public void setCurrentUser(User currentUser) {
		this.currentUser = currentUser;
	}

	public EnumState getCurrentState() {
		return currentState;
	}

	public void setCurrentState(EnumState currentState) {
		this.currentState = currentState;
	}

	public void setStartDate(Date startDate) {
		this.startDate = startDate;
	}

	public Date getStartDate() {
		return startDate;
	}

	public void setLastContentID(Key lastContentID) {
		this.lastContentID = lastContentID;
	}

	public Key getLastContentID() {
		return lastContentID;
	}

}